﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate;
using NHibernate.Mapping;

namespace NhJump.Persistence.Batching
{
    /// <summary>
    /// Specifies how to fetch a result (Critera), and what to do when that result is loaded (ResultAction)
    /// </summary>
    public class CriteriaWithResultAction
    {
        public ICriteria Criteria { get; private set; }
        public Action<IList> ResultAction { get; private set; }

        public CriteriaWithResultAction(ICriteria criteria, Action<IList> resultAction)
        {
            Criteria = criteria;
            ResultAction = resultAction;
        }
    }
}
